<!-- 已发行总量明细  -->
<template>
	<view>
		<AmountofDetailComponent ref="amounto" :type="type" @getTotalPageNo="getTotalPageNo" style="padding: 30upx;" ></AmountofDetailComponent>
	</view>
</template>

<script>
	/* 总量明细 组件 */
	import AmountofDetailComponent from './amountofDetailComponent.vue'
	export default {
		components:{AmountofDetailComponent},
		data() {
			return {
				// type: 1为 已发行总量明细，2为 已销毁总量明细
				type: '10',
				page: 1,
				totalPageNo: 99,
				isLoadText: false
			}
		},
		onPullDownRefresh() {
			this.$refs.amounto.infoRequest()
		},
		onReachBottom() {
			this.onLoadMore()
		},
		methods: {
			getTotalPageNo(totalPageNo,page){
				this.totalPageNo = totalPageNo
				this.page = page
				this.isLoadText = this.$refs.amounto.dataList.length? true : false
			},
			onRefresh(){
				this.$refs.amounto.infoRequest()
				// setTimeout(() => this.$refs.loadRefresh.completed(), 500)
			},
			async onLoadMore(){
				this.$api.showLoading()
				await this.$refs.amounto.getRequest()
				this.$api.hideLoading()
			},
		}
	}
</script>

<style scoped lang="scss">

</style>
